Skip to content

Conversation

chambm
Copy link
Member

@chambm chambm commented Apr 10, 2024

  • added support for Ardia remote accounts through Open Data Source dialog: you can login, browse Ardia, and select RAW files which will be downloaded to the document directory when importing (if they aren't already there)
  • added downloadPath parameter to OpenMsDataFile for Ardia support
  • added WebView2 NuGet package for Ardia login support

Things left to do:

  • Add progress monitoring for RAW file downloading.
  • Add a perftest with the bigger files in Skyline/Large Files on the Ardia server. Need Thermo to tell us what's in those files so we can make a .sky for it.
  • Add and test handling of Ardia accounts for command-line access.
  • Test that opening a document with Ardia results allows viewing a spectrum (clicking on a chromatogram point) even if locally cached RAW files have been deleted (i.e. it redownloads if necessary). Current functional test is importing results into a fresh document.
  • Consider allowing user to leave Skyline's Ardia username/password (or at least password) blank if the user only wants to enter them in the Ardia web dialog (e.g. they don't want Skyline to store the credentials, so they will have to be re-entered if Skyline needs to redownload a RAW).
  • Fix leaks: # TestArdia deltas (25): managed = 321.6 KB, heap = 108.1 KB, memory = 326.3 KB, user-gdi = -0.3, total = 6.6
  • Add user option to delete local RAW files after importing. (requested by Thermo)

@chambm
Copy link
Member Author

chambm commented Apr 22, 2024

Converting from mzXML 32-bit to RAW makes the tutorial go from ~95s to ~110s on my machine. Ardia is slower of course at about ~150s.

{
void ProgressStream_OnUpdateProgress(object sender, ProgressEventArgs e)
{
var newPercentComplete = (int) Math.Round(e.Progress * 100);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProgressStatus objects do something a little weird when you set their progress to 100, so you might want to change this to:
var newPercentComplete = Math.Min(99, (int) Math.Round(e.Progress * 100));

The specific weird thing that they do is that if they have multiple segments, the first time you set the progress to 100, "ProgressStatus.ChangePercentComplete" does the following:
// Turn off progress zooming, if the end has been reached
and the second time you call ChangePercentComplete(100) it sets "State" to ProgressState.complete

Once the progress state has been set to "Complete", "MultiProgressStatus.ChangeStatus" will stop noticing changes on it because:
// Avoid overwriting a final status with a non-final status

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That fixed it, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good way to indicate that the importing stage is actually downloading? There doesn't seem to be an individual text status for replicates in the AllChromatogramsGraph dialog.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a good way to do something like that.

A different approach that we could take could be to make it so that Skyline does not even start trying to extract chromatograms until all of the Ardia files have been downloaded.
That is, we would implement a BackgroundLoader ("ArdiaDownloadManager") that looks at the MsDataFileUri's in the document and figures out whether any of them are ArdiaUrl objects, and, if so, starts downloading them.
We would change "ChromatogramManager.IsReadyToLoad" so that it returns false if the ArdiaDownloadManager says it's not finished.
In this way, the experience would be similar to what the user gets when their are retention time alignments that need to be performed by RetentionTimeManager, and DocumentRetentionTimes.IsNotLoadedExplained returns something indicating that there is still work to be done.
The ArdiaDownloadManager could provide progress that would show up in the Status Bar at the bottom of the Skyline window.

Doing it that way would probably be a worse experience because no chromatogram extraction would happen until all of the files had been downloaded. Also, it's hard to see how to make it work with the "delete after chromatogram extraction" checkbox. But, it's something to keep in mind as a possibility.

@chambm chambm marked this pull request as ready for review November 18, 2024 16:24
…alog: you can login/register, browse Ardia, and select RAW files which will be downloaded to the document directory when importing (if they aren't already there)

- changed Remote Accounts button to pop up the Edit Remote Accounts dialog when user clicks it again (while already browsing the remote accounts)
* added downloadPath parameter to OpenMsDataFile for Ardia support
* added WebView2 NuGet package for Ardia login testing
* added RuntimeIdentifier property to csproj
* added Ardia mode to OrbiPrmTutorialTest and switched the non-Ardia mode to use RAW files to get the same results between Ardia and non-Ardia (there are some issues to resolve with the mzXML reader getting different results, but I don't have time to keep digging into it)
* changed expected values for OrbiPrmTutorialTest fold change to float array; using RAW files as a source may be introducing some noise when trying to use values that originate with 32-bit precision at 64-bit precision
* added Role textbox for Ardia accounts
- added automatic trimming of trailing slash to EditRemoteAccountDlg's ServerUrl
- added testing that deleting RAW file before clicking on chromatogram point will automatically redownload the RAW
* fixed instrument model parsing for Thermo ISQ EC and ISQ EM (fixes the unknown mass analyzer warning for these Ardia functional test files)
* Add "OpenMsDataFileParams" which has a CancellationToken, IProgressMonitor and ProgressStatus
* added "Delete RAW after importing" checkbox for Ardia accounts (requested by Mark) and added test
* fixed OpenDataSourceDialog.RestoreState() to work with RemoteUrl
"Remote Account Details" for Ardia label the Username as "Alias"
EditRemoteAccount: Uncomment Validate Username Populated. Make for UNIFY only
Add "Logout Ardia" to "Remote Account Details" Dlg
When Edit existing entry, Disable the AccountType so cannot be changed.
If Ardia account and logged in, disable all text and checkbox inputs and btnOK until "Logout" button is clicked.
Change EditRemoteAccountDlg to use WizardPage
ArdiaAcct: Make "Test" in EditRemoteAccountDlg do saved Ardia Session
EditRemoteAccountDlg: Set "Test" button text to "Connect" when applicable.
Change to use System Default Browser for Ardia Login & Logout
Handle all Non-UI thread Exceptions so Skyline does not crash.
@chambm chambm force-pushed the Skyline/work/20240410_Ardia branch from 58d7261 to ec8c281 Compare November 22, 2024 18:10
@chambm chambm merged commit 3f9523a into master Nov 22, 2024
12 of 13 checks passed
@chambm chambm deleted the Skyline/work/20240410_Ardia branch November 25, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants